﻿@{ 
    IEnumerable<string> files = from fullFilename in Directory.EnumerateFiles(Domain.NetworkRemoteDevice.RemoteDeviceManager.PathToSave)
                                select Path.GetFileName(fullFilename);
    IEnumerable<SelectListItem> fileSelectItems = files.Select(i => new SelectListItem()
    {
        Text = i.ToString(),
        Value = i
    });
}
<div class="popup-box" id="popup-box-loadState">
        <div class="close">
            &times;</div>
        <div class="top">
            <h2>
                Загрузить</h2>
        </div>
        <div class="bottom">
            @using (Html.BeginForm("LoadState", "Manage", FormMethod.Post))
            {
                @Html.Label("Выбирите файл");
                @Html.DropDownList("fileName", fileSelectItems, new { id = "choosedFile" });
                <br />
                <br />
                <br />
            <div class="yesNo">
                <input class="btn" type="submit" value="Загрузить" />
                @Html.ActionLink("Отмена", "Manage")
            </div>
            }
        </div>
    </div>        


    